package org.itboys.mobile.dto;

import java.math.BigDecimal;

/**
 * 作者：jiangxiong
 * 日期：2017年5月8日
 * 描述：圣代_预支付（返回给前端的记过）_dto。
 */

public class TianJieWalletBlockRecordDto extends MobileBaseDto{

    private BigDecimal totalAmount;//交易总金额
    private BigDecimal amount;//交易单价
    private BigDecimal blockNumber;//交易数量
    private Integer type;//交易类型。1，买入，2卖出，3退出区块链，4消费卡转入
    private Integer status;//1委托中，2已成交
    public TianJieWalletBlockRecordDto() {

    }


    public TianJieWalletBlockRecordDto(long id, String createTime, String createDate, BigDecimal totalAmount, BigDecimal amount, BigDecimal blockNumber, Integer type, Integer status) {
        super(id, createTime, createDate);
        this.totalAmount = totalAmount;
        this.amount = amount;
        this.blockNumber = blockNumber;
        this.type = type;
        this.status = status;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getBlockNumber() {
        return blockNumber;
    }

    public void setBlockNumber(BigDecimal blockNumber) {
        this.blockNumber = blockNumber;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String  getTypeStr(){
        String typeStr= "";
        if(type==null)return typeStr;

        switch (type) {
            case 1:
                typeStr="买入";
                break;
            case 2:
                typeStr="卖出";
                break;
            case 3:
                typeStr="退出区块链";
                break;
            case 4:
                typeStr="消费卡转入";
                break;
            default:
                break;
        }
        return typeStr;
    }
    public String  getStatusStr(){
        String statusStr= "";
        if(status==null)return statusStr;

        switch (status) {
            case 1:
                statusStr="委托中";
                break;
            case 2:
                statusStr="已成交";
                break;
            default:
                break;
        }
        return statusStr;
    }
    public String getInfo(){
        return "字段说明：1，totalAmount:交易金额；2，amount:交易单价，3，blockNumber:交易数量，4，status:交易状态：（1委托中2已成交）5，type:交易类型（1买入2卖出3退出区块链4转入）";
    }
}
